.modal {

    display: none;
    position: fixed;
    z-index: 40;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;

    align-items: center;
    justify-content: center;


    &.is-active {
        display: flex;
    }

    & .modal-content {
        margin: 0 auto;
        max-height: calc(100vh - 40px);
        width: 640px;
    }

    & .modal-background {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        left: 0;
        background-color: gray(24, 90%);
    }


    & .modal-close {
        height: ms(3)rem;
        width: ms(3)rem;
        position: absolute;
        top: 20px;
        right: 20px;
        background-color: gray(114, 90%);
        border-radius: ms(3)rem;
        appearance: none;
        outline: none;
        border: none;

        &:after, &:before {
            content: '';
            height: 2px;
            width: 50%;
            background-color: white;
            position: absolute;
            left: 50%;
            top: 50%;
        }

        &:hover {
            background-color: gray(24, 90%);
        }

        &:after {
            transform: translate(-50%, -50%) rotate(-45deg);
        }

        &:before {
            transform: translate(-50%, -50%) rotate(45deg);
        }
    }

    & .modal-card {
        position: relative;
        display: flex;
        flex-direction: column;
        margin: 0 auto;
        max-height: calc(100vh - 40px);
        width: 640px;
        border: none;

        & .modal-card-head {
            display: flex;
            flex: 1 0 auto;
            padding: .75rem;
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
            border-bottom: 1px solid gray(219);
            background-color: whitesmoke;
            align-items: center;

            & .modal-card-title {
                flex: 1 0 auto;
                font-size: ms(2)rem;
                font-weight: 700;
            }
        }

        & .modal-card-body {
            overflow: auto;
            background-color: white;
            padding: 1rem;
            flex: 1 1 auto;
        }

        & .modal-card-foot {
            flex: 1 0 auto;
            background-color: whitesmoke;
            padding: 1rem;
        }
    }
}
